﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ProgrammesList.ascx.cs" Inherits="MockPrjTeam4.Pages.Views.ProgrammesList22" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<script type="text/javascript">
    function Confirm_Alert() {
        return confirm('Do you want to make this Programme active ?');
    }
</script>
<style type="text/css">
    .style1
    {
        width: 220px;
    }
    .wrap
    {
        border: 1px solid #3b3b3b;
        border-radius: 5px;
        height: auto;
        margin: 50px 0 0 50px;
        width: 860px;
        }
    .result
    {
        text-align: justify;
        margin-left: 300px;
        font-weight: bold;
        font-size: larger;
        color: Red;
        }
</style>
<div class="wrap">
    <div style=" border-bottom: 1px solid #3b3b3b;">
        <table cellspacing="2px" cellpadding="2px" 
        style="width: 88%; margin-left: 50px;">
        <tr>
    		<td class="style1" colspan="2">
            Programme Name:&nbsp&nbsp&nbsp<asp:TextBox runat="Server" ID="txtProName" Height="27px" 
                    Width="185px"></asp:TextBox>    
            </td>
    	</tr>
        <tr>
            <td class="style1">
                <asp:Button runat="Server" ID="btnSearch" Text="Search" OnClick="btnSearch_Click"/>&nbsp
                <asp:Button runat="Server" ID="btnClear" Text="Clear" onclick="btnClear_Click"/>&nbsp
            </td>
            <td class="style3" align="right">
                <asp:Button runat="Server" ID="btnAdd" Text="Create" onclick="btnAdd_Click"/>&nbsp
                <asp:CheckBox runat="Server" ID="chkInactive" 
                    Text="Include in-active Programme?"
                    oncheckedchanged="chkInactive_CheckedChanged" AutoPostBack="true"/>
                <asp:HiddenField ID="hdffilter" runat="Server"/>
            </td>
        </tr>
    </table>
    </div>
    
    <table border="0" cellspacing="2px" cellpadding="2px" 
        style="height: 257px; width: 88%; margin-left: 50px">
        <tr>
            <td colspan="2">
                <asp:LinkButton ID="lkbtnAll" runat="server" Text="All" ForeColor="Blue"
                            CommandName="SearchAll" OnCommand="Click"></asp:LinkButton>&nbsp|&nbsp
                            <asp:LinkButton ID="lkbtn09" runat="server" Text="0 - 9" ForeColor="Blue"
                            CommandName="Search09" OnCommand="Click"></asp:LinkButton>&nbsp|&nbsp
                            <asp:LinkButton ID="lkbtnAE" runat="server" Text="A B C D E" ForeColor="Blue"
                            CommandName="SearchAE" OnCommand="Click"></asp:LinkButton>&nbsp|&nbsp
                            <asp:LinkButton ID="lkbtnFJ" runat="server" Text="F G H I J" ForeColor="Blue"
                            CommandName="SearchFJ" OnCommand="Click"></asp:LinkButton>&nbsp|&nbsp
                            <asp:LinkButton ID="lkbtnKN" runat="server" Text="K L M N" ForeColor="Blue"
                            CommandName="SearchKN" OnCommand="Click"></asp:LinkButton>&nbsp|&nbsp
                            <asp:LinkButton ID="lkbtnOR" runat="server" Text="O P Q R" ForeColor="Blue"
                            CommandName="SearchOR" OnCommand="Click"></asp:LinkButton>&nbsp|&nbsp
                            <asp:LinkButton ID="lkbtnSV" runat="server" Text="S T U V" ForeColor="Blue"
                            CommandName="SearchSV" OnCommand="Click"></asp:LinkButton>&nbsp|&nbsp
                            <asp:LinkButton ID="lkbtnWZ" runat="server" Text="W X Y Z" ForeColor="Blue"
                            CommandName="SearchWZ" OnCommand="Click"></asp:LinkButton>
            </td>
        </tr>
        <tr>
    		<td colspan="2">
            <div class="result">
                <asp:Label ID="lblMessageResult" runat="Server"></asp:Label>
            </div>
            <br />
                <asp:GridView runat="Server" ID="gvListProgramme" Width="100%" 
                    BackColor="White" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px" 
                    CellPadding="4" AutoGenerateColumns="False" AllowPaging="true" AllowSorting="true"
                    OnPageIndexChanging="gvListProgramme_PageIndexChanging" PageSize="15">
                        <Columns>
                            <asp:TemplateField HeaderText="Programme Name">
                            <ItemTemplate>
                                <asp:LinkButton ID="lkbtnProName" runat="Server" ForeColor="Blue"
                                OnClientClick='<%# !(bool)Eval("IsActive") ? "return Confirm_Alert();" : string.Empty %>'
                                CommandName='<%# Eval("ProgrammeId") %>' CommandArgument='<%# Eval("IsActive") %>'
                                OnCommand="lkbtnProName_Click" ><%# Eval("ProgrammeName")%></asp:LinkButton>
                            </ItemTemplate>
                            <ItemStyle ForeColor="Black"/>
                        </asp:TemplateField>
                            <asp:BoundField DataField="Description" HeaderText="Description"/>
                            <asp:BoundField DataField="IsActive" HeaderText="Is Active"/>
                        </Columns>
                    <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
                    <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
                    <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
                    <RowStyle BackColor="White" ForeColor="#330099" />
                    <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
                    <SortedAscendingCellStyle BackColor="#FEFCEB" />
                    <SortedAscendingHeaderStyle BackColor="#AF0101" />
                    <SortedDescendingCellStyle BackColor="#F6F0C0" />
                    <SortedDescendingHeaderStyle BackColor="#7E0000" />

<SortedAscendingCellStyle BackColor="#FEFCEB"></SortedAscendingCellStyle>

<SortedAscendingHeaderStyle BackColor="#AF0101"></SortedAscendingHeaderStyle>

<SortedDescendingCellStyle BackColor="#F6F0C0"></SortedDescendingCellStyle>

<SortedDescendingHeaderStyle BackColor="#7E0000"></SortedDescendingHeaderStyle>
                </asp:GridView>
                <asp:ObjectDataSource ID="odsListPro" runat="server" 
                    SelectMethod="GetListProgramme" TypeName="MockPrjTeam4.Biz.ProgrammeBiz">
                </asp:ObjectDataSource>
            </td>
    	</tr>
    </table>
</div>

